package com.qf.device.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.device.entity.Device;
import com.qf.dto.PageDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 设备表 Mapper 接口
 * </p>
 *
 * @author zhu
 * @since 2023-10-26
 */
@Mapper
public interface DeviceMapper extends BaseMapper<Device> {
    List<Device> findAll(
            @Param("pageDto") PageDto<Device> pageDto,
            @Param("name") String name,
            @Param("deviceKey") String deviceKey,
            @Param("deviceTypeId") Long deviceTypeId,
            @Param("active") Integer active
    );

    Long count(
            @Param("name") String name,
            @Param("deviceKey") String deviceKey,
            @Param("deviceTypeId") Long deviceTypeId,
            @Param("active") Integer active
    );
}
